package com.link2room.quintesson.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Entity;
import java.util.Date;

/**
 * Created by sss on 2017/7/12.
 */
@Entity
@javax.persistence.Table(name = "taobao_invoice")
@DynamicInsert
public class TaobaoInvoice extends BaseEntity{
    private String terminalNo;

    private String l2RNo;

    private Integer invoiceType;

    private String invoiceTitle;

    private Integer action;

    private Integer status;

    private String taxpayerId;

    private Integer postType;

    private Integer earlyPrepare;

    private String regAddress;

    private String receiverName;

    private String receiverMobile;

    private String receiverAddress;

    private Integer provider;

    private Integer payer;

    private Date wantIme;

    private String companyTel;

    private String bankName;

    private String bankAccount;

    private String comment;

    private String displayText;

    private String extensions;
    @Basic
    @javax.persistence.Column(name = "terminal_no", nullable = true, length = 32)
    public String getTerminalNo() {
        return terminalNo;
    }

    public void setTerminalNo(String terminalNo) {
        this.terminalNo = terminalNo;
    }

    @Basic
    @javax.persistence.Column(name = "l2r_no", nullable = true, length = 32)
    public String getL2RNo() {
        return l2RNo;
    }

    public void setL2RNo(String l2RNo) {
        this.l2RNo = l2RNo;
    }

    @Basic
    @javax.persistence.Column(name = "invoice_type", nullable = true)
    public Integer getInvoiceType() {
        return invoiceType;
    }

    public void setInvoiceType(Integer invoiceType) {
        this.invoiceType = invoiceType;
    }

    @Basic
    @javax.persistence.Column(name = "invoice_title", nullable = true, length = 50)
    public String getInvoiceTitle() {
        return invoiceTitle;
    }

    public void setInvoiceTitle(String invoiceTitle) {
        this.invoiceTitle = invoiceTitle;
    }

    @Basic
    @javax.persistence.Column(name = "action", nullable = true)
    public Integer getAction() {
        return action;
    }

    public void setAction(Integer action) {
        this.action = action;
    }

    @Basic
    @javax.persistence.Column(name = "status", nullable = true)
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Basic
    @javax.persistence.Column(name = "taxpayer_id", nullable = true, length = 50)
    public String getTaxpayerId() {
        return taxpayerId;
    }

    public void setTaxpayerId(String taxpayerId) {
        this.taxpayerId = taxpayerId;
    }

    @Basic
    @javax.persistence.Column(name = "post_type", nullable = true)
    public Integer getPostType() {
        return postType;
    }

    public void setPostType(Integer postType) {
        this.postType = postType;
    }

    @Basic
    @javax.persistence.Column(name = "early_prepare", nullable = true)
    public Integer getEarlyPrepare() {
        return earlyPrepare;
    }

    public void setEarlyPrepare(Integer earlyPrepare) {
        this.earlyPrepare = earlyPrepare;
    }

    @Basic
    @javax.persistence.Column(name = "reg_address", nullable = true, length = 100)
    public String getRegAddress() {
        return regAddress;
    }

    public void setRegAddress(String regAddress) {
        this.regAddress = regAddress;
    }

    @Basic
    @javax.persistence.Column(name = "receiver_name", nullable = true, length = 10)
    public String getReceiverName() {
        return receiverName;
    }

    public void setReceiverName(String receiverName) {
        this.receiverName = receiverName;
    }

    @Basic
    @javax.persistence.Column(name = "receiver_mobile", nullable = true, length = 50)
    public String getReceiverMobile() {
        return receiverMobile;
    }

    public void setReceiverMobile(String receiverMobile) {
        this.receiverMobile = receiverMobile;
    }

    @Basic
    @javax.persistence.Column(name = "receiver_address", nullable = true, length = 100)
    public String getReceiverAddress() {
        return receiverAddress;
    }

    public void setReceiverAddress(String receiverAddress) {
        this.receiverAddress = receiverAddress;
    }

    @Basic
    @javax.persistence.Column(name = "provider", nullable = true)
    public Integer getProvider() {
        return provider;
    }

    public void setProvider(Integer provider) {
        this.provider = provider;
    }

    @Basic
    @javax.persistence.Column(name = "payer", nullable = true)
    public Integer getPayer() {
        return payer;
    }

    public void setPayer(Integer payer) {
        this.payer = payer;
    }

    @Basic
    @javax.persistence.Column(name = "want_ime", nullable = true)
    public Date getWantIme() {
        return wantIme;
    }

    public void setWantIme(Date wantIme) {
        this.wantIme = wantIme;
    }

    @Basic
    @javax.persistence.Column(name = "company_tel", nullable = true, length = 50)
    public String getCompanyTel() {
        return companyTel;
    }

    public void setCompanyTel(String companyTel) {
        this.companyTel = companyTel;
    }

    @Basic
    @javax.persistence.Column(name = "bank_name", nullable = true, length = 50)
    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    @Basic
    @javax.persistence.Column(name = "bank_account", nullable = true, length = 50)
    public String getBankAccount() {
        return bankAccount;
    }

    public void setBankAccount(String bankAccount) {
        this.bankAccount = bankAccount;
    }

    @Basic
    @javax.persistence.Column(name = "comment", nullable = true, length = 512)
    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    @Basic
    @javax.persistence.Column(name = "display_text", nullable = true, length = -1)
    public String getDisplayText() {
        return displayText;
    }

    public void setDisplayText(String displayText) {
        this.displayText = displayText;
    }


    @Basic
    @javax.persistence.Column(name = "extensions", nullable = true, length = 512)
    public String getExtensions() {
        return extensions;
    }

    public void setExtensions(String extensions) {
        this.extensions = extensions;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TaobaoInvoice that = (TaobaoInvoice) o;

        if (terminalNo != null ? !terminalNo.equals(that.terminalNo) : that.terminalNo != null) return false;
        if (l2RNo != null ? !l2RNo.equals(that.l2RNo) : that.l2RNo != null) return false;
        if (invoiceType != null ? !invoiceType.equals(that.invoiceType) : that.invoiceType != null) return false;
        if (invoiceTitle != null ? !invoiceTitle.equals(that.invoiceTitle) : that.invoiceTitle != null) return false;
        if (action != null ? !action.equals(that.action) : that.action != null) return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;
        if (taxpayerId != null ? !taxpayerId.equals(that.taxpayerId) : that.taxpayerId != null) return false;
        if (postType != null ? !postType.equals(that.postType) : that.postType != null) return false;
        if (earlyPrepare != null ? !earlyPrepare.equals(that.earlyPrepare) : that.earlyPrepare != null) return false;
        if (regAddress != null ? !regAddress.equals(that.regAddress) : that.regAddress != null) return false;
        if (receiverName != null ? !receiverName.equals(that.receiverName) : that.receiverName != null) return false;
        if (receiverMobile != null ? !receiverMobile.equals(that.receiverMobile) : that.receiverMobile != null)
            return false;
        if (receiverAddress != null ? !receiverAddress.equals(that.receiverAddress) : that.receiverAddress != null)
            return false;
        if (provider != null ? !provider.equals(that.provider) : that.provider != null) return false;
        if (payer != null ? !payer.equals(that.payer) : that.payer != null) return false;
        if (wantIme != null ? !wantIme.equals(that.wantIme) : that.wantIme != null) return false;
        if (companyTel != null ? !companyTel.equals(that.companyTel) : that.companyTel != null) return false;
        if (bankName != null ? !bankName.equals(that.bankName) : that.bankName != null) return false;
        if (bankAccount != null ? !bankAccount.equals(that.bankAccount) : that.bankAccount != null) return false;
        if (comment != null ? !comment.equals(that.comment) : that.comment != null) return false;
        if (displayText != null ? !displayText.equals(that.displayText) : that.displayText != null) return false;
        if (extensions != null ? !extensions.equals(that.extensions) : that.extensions != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = terminalNo != null ? terminalNo.hashCode() : 0;
        result = 31 * result + (l2RNo != null ? l2RNo.hashCode() : 0);
        result = 31 * result + (invoiceType != null ? invoiceType.hashCode() : 0);
        result = 31 * result + (invoiceTitle != null ? invoiceTitle.hashCode() : 0);
        result = 31 * result + (action != null ? action.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (taxpayerId != null ? taxpayerId.hashCode() : 0);
        result = 31 * result + (postType != null ? postType.hashCode() : 0);
        result = 31 * result + (earlyPrepare != null ? earlyPrepare.hashCode() : 0);
        result = 31 * result + (regAddress != null ? regAddress.hashCode() : 0);
        result = 31 * result + (receiverName != null ? receiverName.hashCode() : 0);
        result = 31 * result + (receiverMobile != null ? receiverMobile.hashCode() : 0);
        result = 31 * result + (receiverAddress != null ? receiverAddress.hashCode() : 0);
        result = 31 * result + (provider != null ? provider.hashCode() : 0);
        result = 31 * result + (payer != null ? payer.hashCode() : 0);
        result = 31 * result + (wantIme != null ? wantIme.hashCode() : 0);
        result = 31 * result + (companyTel != null ? companyTel.hashCode() : 0);
        result = 31 * result + (bankName != null ? bankName.hashCode() : 0);
        result = 31 * result + (bankAccount != null ? bankAccount.hashCode() : 0);
        result = 31 * result + (comment != null ? comment.hashCode() : 0);
        result = 31 * result + (displayText != null ? displayText.hashCode() : 0);
        result = 31 * result + (extensions != null ? extensions.hashCode() : 0);
        return result;
    }
}
